<?php

if (!function_exists( 'woo_options')) {

function woo_options() {



// THEME VARIABLES

$themename = "ndp_woo";

$themeslug = "slug_ndp_woo";



// STANDARD VARIABLES. DO NOT TOUCH!

$shortname = "woo";

$manualurl = 'http://jamweb.strawberry-jam.vn/support/theme-documentation/'.$themeslug.'/';



//Access the WordPress Categories via an Array

$woo_categories = array();

$woo_categories_obj = get_categories( 'hide_empty=0' );

foreach ($woo_categories_obj as $woo_cat) {

    $woo_categories[$woo_cat->cat_ID] = $woo_cat->cat_name;}

$categories_tmp = array_unshift($woo_categories, "Select a category:" );



//Access the WordPress Pages via an Array

$woo_pages = array();

$woo_pages_obj = get_pages( 'sort_column=post_parent,menu_order' );

foreach ($woo_pages_obj as $woo_page) {

    $woo_pages[$woo_page->ID] = $woo_page->post_name; }

$woo_pages_tmp = array_unshift($woo_pages, "Select a page:" );



//Stylesheets Reader

$alt_stylesheet_path = get_template_directory() . '/styles/';

$alt_stylesheets = array();

if ( is_dir($alt_stylesheet_path) ) {

    if ($alt_stylesheet_dir = opendir($alt_stylesheet_path) ) {

        while ( ($alt_stylesheet_file = readdir($alt_stylesheet_dir)) !== false ) {

            if(stristr($alt_stylesheet_file, ".css") !== false) {

                $alt_stylesheets[] = $alt_stylesheet_file;

            }

        }

    }

}



//More Options

$other_entries = array( "0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19" );



// THIS IS THE DIFFERENT FIELDS

$options = array();





// General



		$options[] = array( 'name' => __( 'General Settings', 'woothemes' ),

			'type' => 'heading',

			'icon' => 'general' );



		$options[] = array( 'name' => __( 'Quick Start', 'woothemes' ),

					'type' => 'subheading' );



		$options[] = array( 'name' => __( 'Theme Stylesheet', 'woothemes' ),

			'desc' => __( 'Select your themes alternative color scheme.', 'woothemes' ),

			'id' => $shortname . '_alt_stylesheet',

			'std' => 'default.css',

			'type' => 'select',

			'options' => $alt_stylesheets );



		$options[] = array( 'name' => __( 'Custom Logo', 'woothemes' ),

			'desc' => __( 'Upload a logo for your theme, or specify an image URL directly.', 'woothemes' ),

			'id' => $shortname . '_logo',

			'std' => '',

			'type' => 'upload' );



		$options[] = array( 'name' => __( 'Custom Favicon', 'woothemes' ),

			'desc' => __( 'Upload a 16px x 16px <a href="http://www.faviconr.com/">ico image</a> that will represent your website\'s favicon.', 'woothemes' ),

			'id' => $shortname . '_custom_favicon',

			'std' => '',

			'type' => 'upload' );



		$options[] = array( 'name' => __( 'Tracking Code', 'woothemes' ),

			'desc' => __( 'Paste your Google Analytics (or other) tracking code here. This will be added into the footer template of your theme.', 'woothemes' ),

			'id' => $shortname . '_google_analytics',

			'std' => '',

			'type' => 'textarea' );





		$options[] = array( 'name' => __( 'Display Options', 'woothemes' ),

					'type' => 'subheading' );





        $options[] = array( "name" => __("Products Per Page","woothemes"),

                    "desc" => __("The number of products to display on one page.","woothemes"),

                    "id" => $shortname."_products_per_page",

                    "std" => 12,

                    "type" => "text" );

                    

		$options[] = array( 'name' => __( 'Custom CSS', 'woothemes' ),

			'desc' => __( 'Quickly add some CSS to your theme by adding it to this block.', 'woothemes' ),

			'id' => $shortname . '_custom_css',

			'std' => '',

			'type' => 'textarea' );

        

       	$options[] = array( 'name' => __( 'Post per page', 'woothemes' ),

			'id' => $shortname . '_postsperpage',

			'std' => '10',

			'type' => 'text',);

            

            

		$options[] = array( 'name' => __( 'Post/Page Comments', 'woothemes' ),

			'desc' => __( 'Select if you want to enable/disable comments on posts and/or pages.', 'woothemes' ),

			'id' => $shortname . '_comments',

			'std' => 'both',

			'type' => 'select2',

			'options' => array( "post" => __( 'Posts Only', 'woothemes' ), "page" => __( 'Pages Only', 'woothemes' ), "both" => __( 'Pages / Posts', 'woothemes' ), "none" => __( 'None', 'woothemes' ) ) );



		$options[] = array( 'name' => __( 'Post Content', 'woothemes' ),

			'desc' => __( 'Select if you want to show the full content or the excerpt on posts.', 'woothemes' ),

			'id' => $shortname . '_post_content',

			'type' => 'select2',

			'options' => array( "excerpt" => __( 'The Excerpt', 'woothemes' ), "content" => __( 'Full Content', 'woothemes' ) ) );



		$options[] = array( 'name' => __( 'Post Author Box', 'woothemes' ),

			'desc' => sprintf( __( 'This will enable the post author box on the single posts page. Edit description in %1$s.', 'woothemes' ), '<a href="' . home_url() . '/wp-admin/profile.php">' . __( 'Profile', 'woothemes' ) . '</a>' ),

			'id' => $shortname . '_post_author',

			'std' => 'true',

			'type' => 'checkbox' );



		$options[] = array( 'name' => __( 'Display Breadcrumbs', 'woothemes' ),

			'desc' => __( 'Display dynamic breadcrumbs on each page of your website.', 'woothemes' ),

			'id' => $shortname . '_breadcrumbs_show',

			'std' => 'false',

			'type' => 'checkbox' );



		$options[] = array( 'name' => __( 'Display Pagination', 'woothemes' ),

			'desc' => __( 'Display pagination on the blog.', 'woothemes' ),

			'id' => $shortname . '_pagenav_show',

			'std' => 'true',

			'type' => 'checkbox' );



		$options[] = array( 'name' => __( 'Pagination Style', 'woothemes' ),

			'desc' => __( 'Select the style of pagination you would like to use on the blog.', 'woothemes' ),

			'id' => $shortname . '_pagination_type',

			'type' => 'select2',

			'options' => array( "paginated_links" => __( 'Numbers', 'woothemes' ), "simple" => __( 'Next/Previous', 'woothemes' ) ) );



		// Styling

		$options[] = array( 'name' => __( 'Styling Options', 'woothemes' ),

			'type' => 'heading',

			'icon' => 'styling' );



		$options[] = array( 'name' => __( 'Background', 'woothemes' ),

			'type' => 'subheading' );



		$options[] = array( 'name' => __( 'Body Background Color', 'woothemes' ),

			'desc' => __( 'Pick a custom color for background color of the theme e.g. #697e09', 'woothemes' ),

			'id' => $shortname . '_body_color',

			'std' => '',

			'type' => 'color' );



		$options[] = array( 'name' => __( 'Body background image', 'woothemes' ),

			'desc' => __( 'Upload an image for the theme\'s background', 'woothemes' ),

			'id' => $shortname . '_body_img',

			'std' => '',

			'type' => 'upload' );



		$options[] = array( 'name' => __( 'Background image repeat', 'woothemes' ),

			'desc' => __( 'Select how you would like to repeat the background-image', 'woothemes' ),

			'id' => $shortname . '_body_repeat',

			'std' => 'no-repeat',

			'type' => 'select',

			'options' => array( "no-repeat", "repeat-x", "repeat-y", "repeat" ) );



		$options[] = array( 'name' => __( 'Background image position', 'woothemes' ),

			'desc' => __( 'Select how you would like to position the background', 'woothemes' ),

			'id' => $shortname . '_body_pos',

			'std' => "top",

			'type' => 'select',

			'options' => array( "top left", "top center", "top right", "center left", "center center", "center right", "bottom left", "bottom center", "bottom right" ) );

			

		$options[] = array( "name" => "Background Attachment",

            "desc" => "Select whether the background should be fixed or move when the user scrolls",

            "id" => $shortname."_body_attachment",

            "std" => "scroll",

            "type" => "select",

            "options" => array( "scroll","fixed"));



		$options[] = array( 'name' => __( 'Links', 'woothemes' ),

			'type' => 'subheading' );



		$options[] = array( 'name' => __( 'Link Color', 'woothemes' ),

			'desc' => __( 'Pick a custom color for links or add a hex color code e.g. #697e09', 'woothemes' ),

			'id' => $shortname . '_link_color',

			'std' => '',

			'type' => 'color' );



		$options[] = array( 'name' =>  __( 'Link Hover Color', 'woothemes' ),

			'desc' => __( 'Pick a custom color for links hover or add a hex color code e.g. #697e09', 'woothemes' ),

			'id' => $shortname . '_link_hover_color',

			'std' => '',

			'type' => 'color' );



		$options[] = array( 'name' =>  __( 'Button Color', 'woothemes' ),

			'desc' => __( 'Pick a custom color for buttons or add a hex color code e.g. #697e09', 'woothemes' ),

			'id' => $shortname . '_button_color',

			'std' => '',

			'type' => 'color' );



		/* Typography */



		$options[] = array( 'name' => __( 'Typography', 'woothemes' ),

			'type' => 'heading',

			'icon' => 'typography' );



		$options[] = array( 'name' => __( 'Enable Custom Typography', 'woothemes' ) ,

			'desc' => __( 'Enable the use of custom typography for your site. Custom styling will be output in your sites HEAD.', 'woothemes' ) ,

			'id' => $shortname . '_typography',

			'std' => 'false',

			'type' => 'checkbox' );



		$options[] = array( 'name' => __( 'General Typography', 'woothemes' ) ,

			'desc' => __( 'Change the general font.', 'woothemes' ) ,

			'id' => $shortname . '_font_body',

			'std' => array( 'size' => '1.6', 'unit' => 'em', 'face' => 'FontSiteSans-Roman', 'style' => '', 'color' => '#3E3E3E' ),

			'type' => 'typography' );



		$options[] = array( 'name' => __( 'Navigation', 'woothemes' ) ,

			'desc' => __( 'Change the navigation font.', 'woothemes' ),

			'id' => $shortname . '_font_nav',

			'std' => array( 'size' => '1', 'unit' => 'em', 'face' => 'FontSiteSans-Cond', 'style' => '', 'color' => '#3E3E3E' ),

			'type' => 'typography' );



		$options[] = array( 'name' => __( 'Page Title', 'woothemes' ) ,

			'desc' => __( 'Change the page title.', 'woothemes' ) ,

			'id' => $shortname . '_font_page_title',

			'std' => array( 'size' => '2.2', 'unit' => 'em', 'face' => 'BergamoStd', 'style' => 'bold', 'color' => '#3E3E3E' ),

			'type' => 'typography' );



		$options[] = array( 'name' => __( 'Post Title', 'woothemes' ) ,

			'desc' => __( 'Change the post title.', 'woothemes' ) ,

			'id' => $shortname . '_font_post_title',

			'std' => array( 'size' => '2.2', 'unit' => 'em', 'face' => 'BergamoStd', 'style' => 'bold', 'color' => '#3E3E3E' ),

			'type' => 'typography' );



		$options[] = array( 'name' => __( 'Post Meta', 'woothemes' ),

			'desc' => __( 'Change the post meta.', 'woothemes' ) ,

			'id' => $shortname . '_font_post_meta',

			'std' => array( 'size' => '1', 'unit' => 'em', 'face' => 'BergamoStd', 'style' => '', 'color' => '#3E3E3E' ),

			'type' => 'typography' );



		$options[] = array( 'name' => __( 'Post Entry', 'woothemes' ) ,

			'desc' => __( 'Change the post entry.', 'woothemes' ) ,

			'id' => $shortname . '_font_post_entry',

			'std' => array( 'size' => '1', 'unit' => 'em', 'face' => 'BergamoStd', 'style' => '', 'color' => '#3E3E3E' ),

			'type' => 'typography' );



		$options[] = array( 'name' => __( 'Widget Titles', 'woothemes' ) ,

			'desc' => __( 'Change the widget titles.', 'woothemes' ) ,

			'id' => $shortname . '_font_widget_titles',

			'std' => array( 'size' => '1', 'unit' => 'em', 'face' => 'FontSiteSans-Cond', 'style' => 'bold', 'color' => '#3E3E3E' ),

			'type' => 'typography' );

   



	



		/* Dynamic Images */

		$options[] = array( 'name' => __( 'Dynamic Images', 'woothemes' ),

			'type' => 'heading',

			'icon' => 'image' );



		$options[] = array( 'name' => __( 'Resizer Settings', 'woothemes' ),

			'type' => 'subheading' );



		$options[] = array( 'name' => __( 'Dynamic Image Resizing', 'woothemes' ),

			'desc' => '',

			'id' => $shortname . '_wpthumb_notice',

			'std' => __( 'There are two alternative methods of dynamically resizing the thumbnails in the theme, <strong>WP Post Thumbnail</strong> or <strong>TimThumb - Custom Settings panel</strong>. We recommend using WP Post Thumbnail option.', 'woothemes' ),

			'type' => "info" );



		$options[] = array( 'name' => __( 'WP Post Thumbnail', 'woothemes' ),

			'desc' => __( 'Use WordPress post thumbnail to assign a post thumbnail. Will enable the <strong>Featured Image panel</strong> in your post sidebar where you can assign a post thumbnail.', 'woothemes' ),

			'id' => $shortname . '_post_image_support',

			'std' => 'true',

			'class' => "collapsed",

			'type' => 'checkbox' );



		$options[] = array( 'name' => __( 'WP Post Thumbnail - Dynamic Image Resizing', 'woothemes' ),

			'desc' => __( 'The post thumbnail will be dynamically resized using native WP resize functionality. <em>(Requires PHP 5.2+)</em>', 'woothemes' ),

			'id' => $shortname . '_pis_resize',

			'std' => 'true',

			'class' => "hidden",

			'type' => 'checkbox' );



		$options[] = array( 'name' => __( 'WP Post Thumbnail - Hard Crop', 'woothemes' ),

			'desc' => __( 'The post thumbnail will be cropped to match the target aspect ratio (only used if "Dynamic Image Resizing" is enabled).', 'woothemes' ),

			'id' => $shortname . '_pis_hard_crop',

			'std' => 'true',

			'class' => "hidden last",

			'type' => 'checkbox' );



		$options[] = array( 'name' => __( 'TimThumb - Custom Settings Panel', 'woothemes' ),

			'desc' => sprintf( __( 'This will enable the %1$s (thumb.php) script which dynamically resizes images added through the <strong>custom settings panel below the post</strong>. Make sure your themes <em>cache</em> folder is writable. %2$s', 'woothemes' ), '<a href="http://code.google.com/p/timthumb/">TimThumb</a>', '<a href="http://www.woothemes.com/2008/10/troubleshooting-image-resizer-thumbphp/">Need help?</a>' ),

			'id' => $shortname . '_resize',

			'std' => 'true',

			'type' => 'checkbox' );



		$options[] = array( 'name' => __( 'Automatic Image Thumbnail', 'woothemes' ),

			'desc' => __( 'If no thumbnail is specifified then the first uploaded image in the post is used.', 'woothemes' ),

			'id' => $shortname . '_auto_img',

			'std' => 'false',

			'type' => 'checkbox' );



		$options[] = array( 'name' => __( 'Thumbnail Settings', 'woothemes' ),

			'type' => 'subheading' );



		$options[] = array( 'name' => __( 'Thumbnail Image Dimensions', 'woothemes' ),

			'desc' => __( 'Enter an integer value i.e. 250 for the desired size which will be used when dynamically creating the images.', 'woothemes' ),

			'id' => $shortname . '_image_dimensions',

			'std' => '',

			'type' => array(

				array(  'id' => $shortname . '_thumb_w',

					'type' => 'text',

					'std' => 150,

					'meta' => __( 'Width', 'woothemes' ) ),

				array(  'id' => $shortname . '_thumb_h',

					'type' => 'text',

					'std' => 150,

					'meta' => __( 'Height', 'woothemes' ) )

			) );



		$options[] = array( 'name' => __( 'Thumbnail Alignment', 'woothemes' ),

			'desc' => __( 'Select how to align your thumbnails with posts.', 'woothemes' ),

			'id' => $shortname . '_thumb_align',

			'std' => 'alignright',

			'type' => 'select2',

			'options' => array( 'alignleft' => __( 'Left', 'woothemes' ), 'alignright' => __( 'Right', 'woothemes' ), 'aligncenter' => __( 'Center', 'woothemes' ) ) );



		$options[] = array( 'name' => 'Single Post - Show Thumbnail',

			'desc' => __( 'Show the thumbnail in the single post page.', 'woothemes' ),

			'id' => $shortname . '_thumb_single',

			'class' => 'collapsed',

			'std' => 'false',

			'type' => 'checkbox' );



		$options[] = array( 'name' => __( 'Single Post - Thumbnail Dimensions', 'woothemes' ),

			'desc' => __( 'Enter an integer value i.e. 250 for the image size. Max width is 576.', 'woothemes' ),

			'id' => $shortname . '_image_dimensions',

			'std' => '',

			'class' => 'hidden last',

			'type' => array(

				array(  'id' => $shortname . '_single_w',

					'type' => 'text',

					'std' => 200,

					'meta' => __( 'Width', 'woothemes' ) ),

				array(  'id' => $shortname . '_single_h',

					'type' => 'text',

					'std' => 200,

					'meta' => __( 'Height', 'woothemes' ) )

			) );



		$options[] = array( 'name' => __( 'Single Post - Thumbnail Alignment', 'woothemes' ),

			'desc' => __( 'Select how to align your thumbnail with single posts.', 'woothemes' ),

			'id' => $shortname . '_thumb_single_align',

			'std' => 'alignright',

			'type' => 'select2',

			'class' => 'hidden',

			'options' => array( 'alignleft' => __( 'Left', 'woothemes' ), 'alignright' => __( 'Right', 'woothemes' ), 'aligncenter' => __( 'Center', 'woothemes' ) ) );



		$options[] = array( 'name' => __( 'Add thumbnail to RSS feed', 'woothemes' ),

			'desc' => __( 'Add the the image uploaded via your Custom Settings panel to your RSS feed', 'woothemes' ),

			'id' => $shortname . '_rss_thumb',

			'std' => 'false',

			'type' => 'checkbox' );



		$options[] = array( 'name' => __( 'Enable Lightbox', 'woothemes' ),

					'desc' => __( 'Enable the PrettyPhoto lighbox script on images within your website\'s content.', 'woothemes' ),

					'id' => $shortname . '_enable_lightbox',

					'std' => 'false',

					'type' => 'checkbox' );



		/* Footer */

		$options[] = array( 'name' => __( 'Footer Customization', 'woothemes' ),

			'type' => 'heading',

			'icon' => 'footer' );

        

        $options[] = array( 'name' => __( 'Text Above', 'woothemes' ),

			'id' => $shortname . '_connect_text_first',

			'type' => 'textarea' );

        



		

									

        /* Contact Template Settings */

        

        $options[] = array( 'name' => "Contact Page",

        					'icon' => 'maps',

        				    'type' => 'heading');    

        

        $options[] = array( 'name' => "Contact Information",

        					'type' => 'subheading');

        

        $options[] = array( "name" => "Enable Contact Information Panel",

        					"desc" => "Enable the contact informal panel",

        					"id" => $shortname."_contact_panel",

        					"std" => "false",

        					"class" => 'collapsed',

        					"type" => "checkbox" );

        					

        $options[] = array( 'name' => "Location Name",

        					'desc' => "Enter the location name. Example: London Office",

        					'id' => $shortname . '_contact_title',

        					'std' => '',

        					'class' => 'hidden',

        					'type' => 'text' );

        

        $options[] = array( 'name' => "Location Address",

        					'desc' => "Enter your company's address",

        					'id' => $shortname . '_contact_address',

        					'std' => '',

        					'class' => 'hidden',

        					'type' => "textarea" );

        

        $options[] = array( 'name' => "Telephone",

        					'desc' => "Enter your telephone number",

        					'id' => $shortname . '_contact_number',

        					'std' => '',

        					'class' => 'hidden',

        					'type' => 'text' );

        

        $options[] = array( 'name' => "Website",

        					'desc' => "Enter your website",

        					'id' => $shortname . '_contact_fax',

        					'std' => '',

        					'class' => 'hidden last',

        					'type' => 'text' );

        

        $options[] = array( "name" => "Contact Form E-Mail",

        					"desc" => "Enter your E-mail address to use on the 'Contact Form' page Template.",

        					"id" => $shortname."_contactform_email",

        					"std" => "",

        					"type" => "text" );
		
		$options[] = array( "name" => "Facebook",

        					"desc" => "Enter your Fanpage facebook address.",

        					"id" => $shortname."_facebook_address",

        					"std" => "",

        					"type" => "text" );
							
		$options[] = array( "name" => "Twitter",

        					"desc" => "Enter your Twitter address.",

        					"id" => $shortname."_twitter_address",

        					"std" => "",

        					"type" => "text" );
							
		$options[] = array( "name" => "Google+",

        					"desc" => "Enter your Google+ address.",

        					"id" => $shortname."_gplus_address",

        					"std" => "",

        					"type" => "text" );
							
		$options[] = array( "name" => "Hotline 1",

        					"id" => $shortname."_hotline_1",

        					"std" => "",

        					"type" => "text" );
		
		$options[] = array( "name" => "Hotline 2",

        					"id" => $shortname."_hotline_2",

        					"std" => "",

        					"type" => "text" );

        										

        $options[] = array( 'name' => "Maps",

        					'type' => 'subheading');

        					

        $options[] = array( 'name' => "Contact Form Google Maps Coordinates",

        					'desc' => 'Enter your Google Map coordinates to display a map on the Contact Form page template and a link to it on the Contact Us widget. You can get these details from <a href="http://www.getlatlon.com/" target="_blank">Google Maps</a>',

        					'id' => $shortname . '_contactform_map_coords',

        					'std' => '',

        					'type' => 'text' );

        					

        $options[] = array( 'name' => "Disable Mousescroll",

        					'desc' => "Turn off the mouse scroll action for all the Google Maps on the site. This could improve usability on your site.",

        					'id' => $shortname . '_maps_scroll',

        					'std' => '',

        					'type' => 'checkbox');

        

        $options[] = array( 'name' => "Map Height",

        					'desc' => "Height in pixels for the maps displayed on Single.php pages.",

        					'id' => $shortname . '_maps_single_height',

        					'std' => "250",

        					'type' => 'text');

        					

        $options[] = array( 'name' => "Default Map Zoom Level",

        					'desc' => "Set this to adjust the default in the post & page edit backend.",

        					'id' => $shortname . '_maps_default_mapzoom',

        					'std' => "9",

        					'type' => 'select2',

        					'options' => $other_entries);

        

        $options[] = array( 'name' => "Default Map Type",

        					'desc' => "Set this to the default rendered in the post backend.",

        					'id' => $shortname . '_maps_default_maptype',

        					'std' => 'G_NORMAL_MAP',

        					'type' => 'select2',

        					'options' => array( 'G_NORMAL_MAP' => 'Normal', 'G_SATELLITE_MAP' => 'Satellite','G_HYBRID_MAP' => 'Hybrid', 'G_PHYSICAL_MAP' => 'Terrain' ) );

        

        $options[] = array( 'name' => "Map Callout Text",

        					'desc' => "Text or HTML that will be output when you click on the map marker for your location.",

        					'id' => $shortname . '_maps_callout_text',

        					'std' => "",

        					'type' => 'textarea');



// Add extra options through function

if ( function_exists( "woo_options_add") )

	$options = woo_options_add($options);



if ( get_option( 'woo_template') != $options) update_option( 'woo_template',$options);

if ( get_option( 'woo_themename') != $themename) update_option( 'woo_themename',$themename);

if ( get_option( 'woo_shortname') != $shortname) update_option( 'woo_shortname',$shortname);

if ( get_option( 'woo_manual') != $manualurl) update_option( 'woo_manual',$manualurl);



// Woo Metabox Options

// Start name with underscore to hide custom key from the user

global $post;

$woo_metaboxes = array();



// Shown on both posts and pages





// Show only on specific post types or page



if ( ( get_post_type() == 'post') || ( !get_post_type() ) ) {



	// TimThumb is enabled in options

	if ( get_option( 'woo_resize') == "true" ) {

	

		$woo_metaboxes[] = array (	'name' => "image",

									"label" => "Image",

									'type' => "upload",

									'desc' => "Upload an image or enter an URL." );



		$woo_metaboxes[] = array (	'name' => "_image_alignment",

									'std' => "Center",

									"label" => "Image Crop Alignment",

									'type' => 'select2',

									'desc' => "Select crop alignment for resized image",

									'options' => array(	"c" => "Center",

														"t" => "Top",

														"b" => "Bottom",

														"l" => "Left",

														"r" => "Right"));

	// TimThumb disabled in the options

	} else {

	

		$woo_metaboxes[] = array (	'name' => "_timthumb-info",

									"label" => "Image",

									'type' => "info",

									'desc' => "<strong>TimThumb</strong> is disabled. Use the <strong>Featured Image</strong> panel in the sidebar instead, or enable TimThumb in the options panel." );



	}



	$woo_metaboxes[] = array (  'name'  => "embed",

					            'std'  => '',

					            "label" => "Embed Code",

					            'type' => "textarea",

					            'desc' => "Enter the video embed code for your video (YouTube, Vimeo or similar)" );



} // End post



/*

if(get_post_type()=='page') {

    $woo_metaboxes[] = array (	'name' => "_layout",

    							'std' => "normal",

    							"label" => "Layout",

    							'type' => "images",

    							'desc' => "Select the layout you want on this specific post/page.",

    							'options' => array(

    										'layout-default' => $url . 'layout-off.png',

    										'layout-full' => get_template_directory_uri() . '/functions/images/' . '1c.png',

    										'layout-left-content' => get_template_directory_uri() . '/functions/images/' . '2cl.png',

    										'layout-right-content' => get_template_directory_uri() . '/functions/images/' . '2cr.png'));

}

*/





// Add extra metaboxes through function



if ( function_exists( "woo_metaboxes_add") )

	$woo_metaboxes = woo_metaboxes_add($woo_metaboxes);



if ( get_option( 'woo_custom_template' ) != $woo_metaboxes) update_option( 'woo_custom_template', $woo_metaboxes );



} // END woo_options()

} // END function_exists()



// Add options to admin_head

add_action( 'admin_head','woo_options' );



//Enable WooSEO on these Post types

$seo_post_types = array( 'post','page','product' );

define( "SEOPOSTTYPES", serialize($seo_post_types));



//Global options setup

add_action( 'init','woo_global_options' );

function woo_global_options(){

	// Populate WooThemes option in array for use in theme

	global $woo_options;

	$woo_options = get_option( 'woo_options' );

}



?>